﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using VNPT.Excel;
using VNPT.Data;

namespace VNPT.DoiSoat.DoiSoat
{
    public partial class u108_GTGT_VMS_TOLL_VTN : VNPT.Core.uBase
    {
        public u108_GTGT_VMS_TOLL_VTN()
        {
            InitializeComponent();
        }
        public override void LoadSetting()
        {
            mySQLEditor1.Text = DoiSoatSetting.SQL_GTGT_VMS_TOLL_VTN;
            base.LoadSetting();
        }

        private void btnRun_Click(object sender, EventArgs e)
        {
            using (new DevExpress.Utils.WaitDialogForm("Đang tải dữ liệu, vui lòng chờ..."))
            {
                var sql = string.Format(mySQLEditor1.Text, DoiSoatSetting.NAM, DoiSoatSetting.THANG);
                myGridControl3.DataSource = DbServer.GetDataTable(new QueryCommandConfig(sql));
            }
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            DoiSoatSetting.SQL_GTGT_VINAPHONE_GOI_DEN_DLK = mySQLEditor1.Text;
        }

        private void btnXuat_Click(object sender, EventArgs e)
        {
          new VNPT.Utility.Grid.GridExport().Export(myGridControl3);
        }
    }
}
